package org.test.aop;

import org.springframework.stereotype.Component;
import org.test.advisor.Tag;

/**
 * Created by Hy on 2018/7/6.
 */
@Component
public class GreetingImpl implements Greeting{
    @Tag
    public void sayHello(String name) {
        System.out.println("Hello! "+name);
        //故意抛出一个异常看异常信息能否被拦截到
        //throw new RuntimeException("Error。。。。。。。。。。。。");
    }
    public void goodMorning(String name){
        System.out.println("Good Morning! "+name);
    }
    public void goodNight(String name){
        System.out.println("Good Night! "+name);
    }
}
